-- card: 7122 from stack: in.0-2 -- bmap block id: 31237 -- flags: 0000 -- background id: 10385 -- name: student.4 ----- HyperTalk script ----- on closeCard if icon of btn "switch" is 282 then click at loc of btn "switch" end closeCard on calculate get char 1 of card field "EMF" if it="+" then delete char 1 of card field "EMF" end if put card field "EMF" into E get char 1 of card field "R1" if it="+" then delete char 1 of card field "R1" end if put card field "R1" into R1 put abs(R1) into R1 put R1 into card field "R1" get char 1 of card field "R2" if it="+" then delete char 1 of card field "R2" end if put card field "R2" into R2 put abs(R2) into R2 put R2 into card field "R2" get char 1 of card field "R3" if it="+" then delete char 1 of card field "R3" end if put card field "R3" into R3 put abs(R3) into R3 put R3 into card field "R3" if E=0 then send zeroall exit calculate end if if E<>0 and R1=0 then if R2=0 and R3<>0 then put 0 into card field "A3" put 0 into card field "V1" --blow up A1 and A2 put "zap" into card field "A1" put "zap" into card field "A2" end if if R3=0 and R2<>0 then put 0 into card field "A2" put 0 into card field "V1" --blow up A1 and A3 put "zap" into card field "A1" put "zap" into card field "A3" end if if R2=0 and R3=0 then put 0 into card field "V1" --blow up A1, A2, & A3 put "zap" into card field "A1" put "zap" into card field "A2" put "zap" into card field "A3" end if if R2=0 or R3=0 then exit calculate end if end if if R2=0 and R3=0 then put 0 into V1 put E/R1 into I1 put I1/2 into I2 put I2 into I3 else put R2*R3/(R2+R3) into RP put E/(R1+RP) into I1 put I1*RP into V1 if R2=0 then put I1 into I2 else put V1/R2 into I2 end if if R3=0 then put I1 into I3 else put V1/R3 into I3 end if end if set the numberFormat to "0.000" put I1 into card field "A1" put I2 into card field "A2" put I3 into card field "A3" put 1*V1 into card field "V1" end calculate --on closeField -- set icon of btn "switch" to "open circuit" -- send zeroall --end closeField on zeroall put 0 into card field "V1" put 0 into card field "A1" put 0 into card field "A2" put 0 into card field "A3" end zeroall -- part 2 (button) -- low flags: 00 -- high flags: 0000 -- rect: left=339 top=140 right=174 bottom=378 -- title width / last selected line: 0 -- icon id / first selected line: 28757 / 28757 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: switch ----- HyperTalk script ----- on mouseUp if icon of me is 28757 then set icon of me to "close circuit" calculate else set icon of me to "open circuit" zeroall end if end mouseUp -- part 3 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=274 top=106 right=119 bottom=309 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 3 -- text size: 9 -- style flags: 256 -- line height: 12 -- part name: R1 ----- HyperTalk script ----- on closeField if icon of cd btn "Switch" is not 28757 then calculate end closeField -- part 4 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=188 top=111 right=124 bottom=224 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 3 -- text size: 9 -- style flags: 256 -- line height: 12 -- part name: EMF ----- HyperTalk script ----- on closeField if icon of cd btn "Switch" is not 28757 then calculate end closeField -- part 5 (field) -- low flags: 01 -- high flags: 0002 -- rect: left=132 top=143 right=155 bottom=168 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 3 -- text size: 8 -- style flags: 0 -- line height: 10 -- part name: A1 ----- HyperTalk script ----- on mouseUp if 3 = 4 then end if end mouseUp -- part 6 (field) -- low flags: 01 -- high flags: 0002 -- rect: left=226 top=166 right=178 bottom=264 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 3 -- text size: 8 -- style flags: 0 -- line height: 10 -- part name: V1 ----- HyperTalk script ----- on mouseUp if 3 = 4 then end if end mouseUp -- part 7 (field) -- low flags: 01 -- high flags: 0002 -- rect: left=217 top=209 right=221 bottom=255 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 3 -- text size: 8 -- style flags: 0 -- line height: 10 -- part name: A2 ----- HyperTalk script ----- on mouseUp if 3 = 4 then end if end mouseUp -- part 8 (field) -- low flags: 01 -- high flags: 0002 -- rect: left=217 top=246 right=258 bottom=255 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 3 -- text size: 8 -- style flags: 0 -- line height: 10 -- part name: A3 ----- HyperTalk script ----- on mouseUp if 3 = 4 then end if end mouseUp -- part 9 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=283 top=201 right=214 bottom=317 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 3 -- text size: 9 -- style flags: 256 -- line height: 12 -- part name: R2 ----- HyperTalk script ----- on closeField if icon of cd btn "Switch" is not 28757 then calculate end closeField -- part 10 (field) -- low flags: 00 -- high flags: 0000 -- rect: left=282 top=239 right=252 bottom=317 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 3 -- text size: 9 -- style flags: 256 -- line height: 12 -- part name: R3 ----- HyperTalk script ----- on closeField if icon of cd btn "Switch" is not 28757 then calculate end closeField -- part 12 (button) -- low flags: 00 -- high flags: 2000 -- rect: left=225 top=283 right=297 bottom=243 -- title width / last selected line: 0 -- icon id / first selected line: 15420 / 15420 -- text alignment: 1 -- font id: 0 -- text size: 12 -- style flags: 0 -- line height: 16 -- part name: ----- HyperTalk script ----- on mouseUp lock screen go prev unlock screen with wipe right end mouseUp -- part 15 (field) -- low flags: 01 -- high flags: 0000 -- rect: left=242 top=82 right=103 bottom=369 -- title width / last selected line: 0 -- icon id / first selected line: 0 / 0 -- text alignment: 65535 -- font id: 174 -- text size: 14 -- style flags: 2304 -- line height: 18 -- part name: -- part contents for card part 9 ----- text ----- 20 -- part contents for card part 10 ----- text ----- 20 -- part contents for card part 4 ----- text ----- 40 -- part contents for card part 3 ----- text ----- 40 -- part contents for card part 5 ----- text ----- 0 -- part contents for card part 7 ----- text ----- 0 -- part contents for card part 8 ----- text ----- 0 -- part contents for card part 6 ----- text ----- 0 -- part contents for card part 15 ----- text ----- SERIES-PARALLEL